package org.qiyu.live.msg.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.msg.dto.MsgCheckDTO;
import org.qiyu.live.msg.enums.MsgSendResultEnum;
import org.qiyu.live.msg.interfaces.ISmsRpc;
import org.qiyu.live.msg.provider.service.ISmsService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-10-01
 * Time: 19:16
 */
@DubboService
public class ISmsRpcImpl implements ISmsRpc {

    @Resource
    private ISmsService iSmsService;

    @Override
    public MsgSendResultEnum sendLoginCode(String phone) {
        return iSmsService.sendLoginCode(phone);
    }

    @Override
    public MsgCheckDTO checkLoginCode(String phone, Integer code) {
        return iSmsService.checkLoginCode(phone, code);
    }
}